package enums;

public enum ActionEnum {
	fold, call, bet, check;
	
	public static int getIndex(ActionEnum actionEnum){

		int index = -1;
		for (int i = 0; i < ActionEnum.values().length; i++) {
			if(actionEnum == ActionEnum.values()[i]){
				index = i;
				return index;
			}
		}		
		return index;
	}

	public static ActionEnum get(ActionType actionType) 
	{
		if(actionType == ActionType.BET || actionType == ActionType.RAISE) return bet;
		else if(actionType == ActionType.FOLD) return fold;
		else if(actionType == ActionType.CALL) return call;
		else return check;
	}
}
